package com.events;

import com.bricks2break.Player;

/**
 * 
 * This event is started if a ball hits the double points special brick(DoublePointsBrick.java).
 * This last for a given time(duration).
 *
 */
public class DoublePointsEvent extends Event {
	private Player player;

	/**
	 * Constructor
	 * 
	 * @param duration
	 * @param player
	 */
	public DoublePointsEvent(float duration, Player player) {
		super(duration);
		this.player = player;
		player.setScoreMultiplier(2);
	}

	@Override
	/**
	 * Method that reverts the effect of the event
	 */
	public void endEvent() {
		player.setScoreMultiplier(1);
	}
}
